# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-jschema-to-python
_pkgname=jschema_to_python
pkgver=1.2.3
pkgrel=6
pkgdesc='.Generate Python classes from a JSON schema'
arch=('any')
url='https://pypi.org/project/jschema-to-python/#files'
license=('MIT')
depends=('python' 'python-pbr')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('e7e37612573e2f5cf96df6fe7206ecf31c83993e40877b0587df2a42ef2f2ae192e4f8442d40cdfb728c27fca880ae5bb427935fa7b0bbd9fadbb9a643c3c1f0')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

